A digital image may be put into a luma-chroma color space before being encoded. In that form, the color of a pixel is described by three numerical values: one describing its brightness (luma) and two describing its color (chroma). These three numerical values may be identified as Y, U and V. Y is the luma value, and U and V collectively form the chroma value.
Chroma sub-sampling is the practice of encoding images by implementing less resolution for chroma (UV) information than for luma (Y) information. With chroma sub-sampling, the luma value (Y) for each pixel in a digital image may be included in the digital data stream to be encoded. However, only a single chroma pair (UV) is included in the data stream for a group of pixels.
The notation for a chroma sub-sampling pattern is in the form J:a:b. The notation utilizes the concept of a “reference block,” which is a conceptual region that is J pixels wide and 2 pixels high. The indicator value “a” shows the number of chroma values that are included for the top row of the J×2 reference block. The indicator value “b” shows the number of chroma values that are included for the bottom row of the J×2 reference block.
For example, in a reference block that is four pixels wide and two pixels high, YUV 4:4:4 would encode eight chroma values (i.e., four U values and four V values) for the top row of the reference block, and eight chroma values for the bottom row of the reference block. In other words, with YUV 4:4:4, no chroma sub-sampling takes place. For the same 4×2 reference block, YUV 4:2:2 would encode four chroma values (i.e., two U values and two V values) for the top row of the reference block, and four chroma values for the bottom row of the reference block. For the same 4×2 reference block, YUV 4:2:0 would encode two chroma values for the top row of the reference block, and two chroma values included for the bottom row of the reference block.